<template>
  <div class="baidu">
    <input type="text"
           v-model="key"
           @keydown="search">
  </div>
</template>

<script>
export default {
  data () {
    return {
      key: ''
    }
  },
  methods: {
    search () {
      console.log(this.$axios);
      this.$axios.get('/api', {
        wd: 'axios'
      }).then((response) => {
        console.log(response.data)
      })
    }
  }
}
</script>
<style lang="less" scoped>
.baidu {
  width: 100%;
  text-align: center;
  input {
    margin-top: 20%;
    width: 300px;
    height: 50px;
    outline: none;
    font-size: 35px;
  }
}
</style>